package com.zjff.mobiletwo.controller;


import com.zjff.mobiletwo.service.CarouselService;
import com.zjff.mobiletwo.service.InformationService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin//跨域
@RestController//遵循RestFul
@RequestMapping("v2/Carousel/")
public class CarouselController {
    @Resource
    CarouselService CarouselService;
    @Resource
    InformationService InformationService;

    /**
     * 获取轮播信息
     * @return JSON
     */
    @GetMapping("getCarouseList")
    private String getCarouseList(){return CarouselService.getCarouseList() ;}

    /**
     * 获取新闻信息
     * @return JSON
     */
    @GetMapping("getInformationList")
    private String getInformationList(){return InformationService.getInformationList();}

}
